In the following exercises, you will work on your own ‘research question’ using the GESIS Panel data. You can load the data first using my script (maybe it’s useful for you in the following exercises):

library(haven)
library(dplyr)
library(sjlabelled)

gp_covid <- 
  read_sav(
    "./data/ZA5667_v1-1-0.sav"
  ) %>% 
  set_na(na = c(-1:-99, 97, 98)) %>% 
  rowwise() %>%
  mutate(
    mean_trust = 
      mean(
        c_across(hzcy044a:hzcy052a),
        na.rm = TRUE
      )
  ) %>% 
  ungroup() %>% 
  remove_all_labels() %>% 
  mutate(
    pol_leaning_cat = 
      case_when(
        between(political_orientation, 0, 3) ~ "left",
        between(political_orientation, 4, 7) ~ "center",
        political_orientation > 7 ~ "right"
      ) %>% 
      as.factor()
  ) %>% 
  filter(pol_leaning_cat != "NA")

1

Please take a minute and choose a dependent variable (DV) and an independent variable (IV) from the GESIS Panel codebook.

If you’re really struggling finding a proper pair, what about:

  1. hzcy005a as DV and hzcy015a as IV
  2. hzcy026a as DV and age_cat as IV
  3. hzcy072a as DV and sex
Be aware that you may have to conduct some recoding.

2

Run a linear regression model with your variables and education_cat as covariate If it is part of your variables take any other…). Then check visually if the residuals are normally distributed.
You need the perfamance and see package.

3

Now, use the whole battery of regression diagnostics with the check_model() command.